#include <REGX52.H>
#include "Delay.h"
#include "MatrixLED.h"

unsigned char code Animation[]={
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x80,0x80,0x80,0xFF,0x80,0x80,0x80,0x00,
	0x00,0x00,0x00,0x3C,0x42,0x81,0x81,0x81,
	0x42,0x00,0x00,0x00,0x00,0x3C,0x42,0x81,
	0x81,0x81,0x85,0x42,0x3D,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
//将数组数据放在FLASH中，腾出更多arm中的空间做其他事。缺点是数据不能更改了

void main()
{
	unsigned char i,Offset=0,Count=0;
	MatrixLED_Init();
	while(1)
	{
		for (i=0;i<8;i++)
		{
			MartixLED_ShowColumn(i,Animation[i+Offset]);
		}
		Count++;
		if(Count>10)  //相当于定义了一段延时
		{
			Count=0;
			Offset++; //偏移量增加
			if(Offset>32) //32-8+8=32
			{
				Offset=0;
			}
		}
	}
}